package com.js.auth.client.feign;

import com.js.common.response.ObjectRestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author ygl
 * @create 2018-10-30
 * @DESCRIPTION
 **/
@FeignClient(value = "${auth.serviceId}",configuration = {})
public interface ServiceAuthFeign {
    /**
     * 认证客户端调用认证服务器获取解密用户token的公钥
     * @param clientId 客户端ID
     * @param secret   客户端秘钥
     * @return
     */
    @PostMapping(value = "/client/userPubKey")
    public ObjectRestResponse<byte[]> getUserPublicKey(@RequestParam("clientId") String clientId, @RequestParam("secret") String secret);

}
